Just as computers have become more and more prevalent in everyday life, networks of linked computers have become important in distributing information amongst computer users. Through such networks, computer users can share information creating a virtual publishing medium which has become a viable alternative for the print medium.
A `network` of computers can be any number of computers that are able to exchange information with one another. The computers may be arranged in any configuration and may be located in the same room or in different countries, so long as there is some way to connect them together (for example, by telephone lines or other communication systems) so they can exchange information. Just as computers may be connected together to make up a network, networks may also be connected together through tools known as bridges and gateways. These tools allow a computer in one network to exchange information with a computer in another network.
In order to account for the fact that different computers connected to such a network may operate using different protocols and/or data formats, and also that different computers may be located in different time zones, asynchronous messaging and queuing software products have been developed.
Message queuing and commercially available message queuing products are described in "Messaging and Queuing Using the MQI", B. Blakeley, H. Harris & R. Lewis, McGraw-Hill, 1994, and in the following publications which are available from IBM Corporation: "An Introduction to Messaging and Queuing" (IBM Document number GC33-0805-00) and "MQSeries--Message Queue Interface Technical Reference" (IBM Document number SC33-0850-01). IBM and MQSeries are trademarks of IBM Corporation. IBM's MQSeries messaging software products provide transactional messaging support, synchronising messages within logical units of work in accordance with a messaging protocol which gives assured once and once-only message delivery even in the event of system or communications failures. MQSeries products provide assured delivery by not finally deleting a message from storage on a sender system until it is confirmed as safely stored by a receiver system, and by use of sophisticated recovery facilities. Prior to commitment of transfer of the message upon confirmation of successful storage, both the deletion of the message from storage at the sender system and insertion into storage at the receiver system are kept `in doubt` and can be backed out atomically in the event of a failure. This message transmission protocol and the associated transactional concepts and recovery facilities are described in international patent application WO 95/10805 and U.S. Pat. No. 5,465,328, which are incorporated herein by reference.
In such a messaging and queuing system, the computer system that receives information over the network stores such received information in the form of messages in a queue. The computer system need not be operable when the messages are received over the network (e.g, the computer may be turned off if it is the middle of the night in the local time zone). The messages are simply stored in the queue for later retrieval at a time when the receiving computer system makes a request to retrieve a message from the queue. The receiving computer processor requests a specific message from the queue and this message is dequeued and provided to the receiving computer processor for processing thereby.
As is apparent from the above, a particular message is not dequeued until the receiving processor specifically asks for the message. Thus, there is a good chance that some messages are never asked for by the receiving processor and thus end up remaining on the queue for a long period of time. This takes up much storage space in the receiving computer's long term storage (e.g., hard drive) as each queued message has a large amount of stored data associated therewith.
Thus, it has been known to associate expiration data with each queued message and to store this expiration data in long term storage. The expiration data for a particular message includes (in the IBM MQSeries product) a 64-bit field for indicating, with a granularity of 1 millisecond, exactly when this message was placed in the queue (i.e., when the message was received over the network), and also a 32-bit field for indicating, with a granularity of 0.1 seconds, an expiry period (a total length of time during which the message is considered still current).
When the receiving processor requests a specific message from the queue, that message's expiration data is checked (in long term storage) and if the message has expired (expiry period has elapsed) the message is deleted from the queue. This frees up the long term storage for the receipt of more messages. There is then an automatic re-issue of the request to receive the specific message and, for example, a later version of that message is taken off of the queue and returned to the processor.
A major problem with this technique, however, is that in order for a queued message to be considered expired, the receiving computer's processor must have specifically asked for this message to be taken off of the queue. If a particular queued message is never asked for, it could remain on the queue for a long period of time, even years. This could take up a substantial amount of long term memory storage space and results in a very inefficient design.
An improvement has previously been proposed whereby when the processor is looking for a particular message in the queue, it checks the expiration data stored in long term storage for each of the intermediate queued messages that it comes across, deleting the messages that are expired. However, this process requires that long term storage be accessed for each of the intermediate messages, which can take much time, and thus still results in an inefficient design.